<%@ page import="model.User" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>


<nav class="navbar navbar-default">
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
    <ul class="nav navbar-nav">
        <li><a href="add.jsp">学员信息增加&nbsp;&nbsp;<span class="glyphicon glyphicon-cloud"></span></a></li>
        <li><a href="update.jsp">学员信息修改&nbsp;&nbsp;<span class="glyphicon glyphicon-cloud"></span></a></li>
        <li><a href="delete.jsp">学员信息删除&nbsp;&nbsp;<span class="glyphicon glyphicon-cloud"></span></a></li>
        <form class="navbar-form navbar-left" action="QueryServlet" method="post">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="Search" name="search">
            </div>
            <button type="submit" class="btn btn-default">查询</button>
        </form>

    </ul>
</div>
</nav>


<table class="table table-hover" style="margin:auto; width: 80%;">

    <tr>
        <td>学号</td>
        <td>名字</td>
        <td>性别</td>
        <td>生日</td>
        <td>邮箱</td>
        <td>备注</td>
    </tr>
    <%
        List<User> userList=new ArrayList<>();
         userList = (List<User>)request.getSession().getAttribute("userList");

            for (User user:userList){


    %>
    <tr>
        <td><%= user.getId()%></td>
        <td><%= user.getName()%></td>
        <td><%= user.getSex()%></td>
        <td><%= user.getBirth()%></td>
        <td><%= user.getEmail()%></td>
        <td><%= user.getContent()%></td>
    </tr>
    <%
        }

    %>
</table>
</div>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-3.3.1.min.js"></script>
</body>
</html>